using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Collections;
using Negocio;
using ClassesBasicas;


namespace Apresentacao
{
    public partial class ControleDepartamentos : Form
    {
        public CadastroDepartamento dep = new CadastroDepartamento();
        public ControleDepartamentos()
        {
            InitializeComponent();
        }

        private void button2_Click(object sender, EventArgs e)
        {
            this.Close();
        }

        private void listBox1_SelectedIndexChanged(object sender, EventArgs e)
        {

        }

        private void button1_Click(object sender, EventArgs e)
        {
            ArrayList lista = new ArrayList();
            lista = dep.Imprimir();
            
            foreach (string l in lista)
            {
                listBox1.Items.Add(l);
            }
        }
    }
}